package com.ruoyi.zhmk.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zhmk.mapper.ZhmkUsersendMapper;
import com.ruoyi.zhmk.domain.ZhmkUsersend;
import com.ruoyi.zhmk.service.IZhmkUsersendService;
import com.ruoyi.common.core.text.Convert;

/**
 * 人员下发Service业务层处理
 * 
 * @author sxl
 * @date 2021-06-10
 */
@Service
public class ZhmkUsersendServiceImpl implements IZhmkUsersendService 
{
    @Autowired
    private ZhmkUsersendMapper zhmkUsersendMapper;

    /**
     * 查询人员下发
     * 
     * @param usersendId 人员下发ID
     * @return 人员下发
     */
    @Override
    public ZhmkUsersend selectZhmkUsersendById(Long usersendId)
    {
        return zhmkUsersendMapper.selectZhmkUsersendById(usersendId);
    }

    /**
     * 查询人员下发列表
     * 
     * @param zhmkUsersend 人员下发
     * @return 人员下发
     */
    @Override
    public List<ZhmkUsersend> selectZhmkUsersendList(ZhmkUsersend zhmkUsersend)
    {
        return zhmkUsersendMapper.selectZhmkUsersendList(zhmkUsersend);
    }

    /**
     * 新增人员下发
     * 
     * @param zhmkUsersend 人员下发
     * @return 结果
     */
    @Override
    public int insertZhmkUsersend(ZhmkUsersend zhmkUsersend)
    {
        zhmkUsersend.setCreateTime(DateUtils.getNowDate());
        return zhmkUsersendMapper.insertZhmkUsersend(zhmkUsersend);
    }

    /**
     * 修改人员下发
     * 
     * @param zhmkUsersend 人员下发
     * @return 结果
     */
    @Override
    public int updateZhmkUsersend(ZhmkUsersend zhmkUsersend)
    {
        zhmkUsersend.setUpdateTime(DateUtils.getNowDate());
        return zhmkUsersendMapper.updateZhmkUsersend(zhmkUsersend);
    }

    /**
     * 删除人员下发对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZhmkUsersendByIds(String ids)
    {
        return zhmkUsersendMapper.deleteZhmkUsersendByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除人员下发信息
     * 
     * @param usersendId 人员下发ID
     * @return 结果
     */
    @Override
    public int deleteZhmkUsersendById(Long usersendId)
    {
        return zhmkUsersendMapper.deleteZhmkUsersendById(usersendId);
    }
}
